include(GoogleTest)

# ── Unit Tests ────────────────────────────────────────────────────────────────
add_executable(unit_tests
    unit/ControllerTest.cpp
    unit/SensorTest.cpp
)
target_include_directories(unit_tests PRIVATE
    ${CMAKE_SOURCE_DIR}/src
    ${CMAKE_CURRENT_SOURCE_DIR}/unit
)
target_link_libraries(unit_tests
    rvc_lib
    GTest::gtest_main
    GTest::gmock
)
gtest_discover_tests(unit_tests)

# ── Integration Tests ─────────────────────────────────────────────────────────
add_executable(integration_tests
    integration/RVCSystemTest.cpp
)
target_include_directories(integration_tests PRIVATE
    ${CMAKE_SOURCE_DIR}/src
    ${CMAKE_CURRENT_SOURCE_DIR}/unit
)
target_link_libraries(integration_tests
    rvc_lib
    GTest::gtest_main
    GTest::gmock
)
gtest_discover_tests(integration_tests)

# ── System Tests ──────────────────────────────────────────────────────────────
add_executable(system_tests
    system/RVCSimulatorTest.cpp
)
target_link_libraries(system_tests
    simulator_lib
    GTest::gtest_main
)
gtest_discover_tests(system_tests)
